/*
 * Here in below program there are so many mistakes
 * 1. Function should return value
 * 2. Return values should be pointer to integer
 * Will the code below possible to compile. Corrected code in in commented block
 * It's possible to compile and required just type casting to make code logically correct.
 */

#include <stdio.h>

int main()
{
	int *c;

	c = check(10, 20);
	printf("c = %u = %d\n", c, *c);

	return 0;
}

check(int i, int j)
{
	int *p, *q;

	p = &i;
	q = &j;

	if (i > 45) {
		return p;
	} else {
		return q;
	}
}

/*
int 
check(int i, int j)
{
	int *p, *q;

	p = &i;
	q = &j;

	if (i > 45) {
		return ((int)p);
	} else {
		return ((int)q);
	}
}
*/
